<!DOCTYPE html>
<html>
<head>
    <title>新闻中心 {$site_info.site_name|default=''}</title>
    <meta name="keywords" content="{$site_info.site_seo_keywords|default=''}"/>
    <meta name="description" content="{$site_info.site_seo_description|default=''}">
    <include file="public@head"/>
    <hook name="before_head_end"/>
</head>
<body class="page-index">
<div class="container">
    <include file="public@nav"/>
    <div class="contents">
        <!--活动通知/公告-->
        <div class="activity">
            <div class="title">
                <ul class="news-title">
                    <li class="title-item active newTitle" data-id="9"><a href="javascript:;">最新公告</a></li>
                    <li class="title-item newTitle" data-id="10"><a href="javascript:;">志愿者新闻</a></li>
                </ul>
            </div>
            <div class="box-cont">
                <div class="act-forenotice show">
                    <div class="notice">
                        <foreach name="list_1" id="vo">
                        <div class="blockSty">
                            <a href="{:url('detail',['id'=>$vo.post.id])}" target="_blank">
                                <div>
                                    <img src="/html/img/list.png" class="listImg">
                                    <div class="blockTitle">{$vo.post.post_title}</div>
                                    <div style="clear: both;"></div>
                                </div>
                                <div class="timeAdd">
                                    <i class="layui-icon layui-icon-log"></i> {$vo.post.published_time|date="Y/d/m H:i:s"}
                                    <!--<text class="jgSty"></text>-->
                                    <!--<i class="layui-icon layui-icon-location"></i> 山东省日照市阳光海岸社区-->
                                </div>
                            </a>
                        </div>
                        </foreach>
                    </div>
                    <ul class="pagination">{$list_1->render()}</ul>
                </div>
                <div class="act-forenotice hidden">
                    <div class="notice">
                        <foreach name="list_2" id="vo">
                        <div class="blockSty">
                            <a href="{:url('detail',['id'=>$vo.post.id])}" target="_blank">
                                <div>
                                    <img src="/html/img/list.png" class="listImg">
                                    <div class="blockTitle">{$vo.post.post_title}</div>
                                    <div style="clear: both;"></div>
                                </div>
                                <div class="timeAdd">
                                    <i class="layui-icon layui-icon-log">{$vo.post.published_time|date="Y/d/m H:i:s"}</i>
                                </div>
                            </a>
                        </div>
                        </foreach>

                    </div>
                    <ul class="pagination">{$list_2->render()}</ul>
                </div>
            </div>
        </div>
        <div class="statistical">
            <div class="login box">
                <div class="title"><h2>最新公告</h2> <a href="" class="more newMore">MORE</a></div>
                <div class="box-cont hdtj zxgg">
                    <ul>
                        <li>
                            <img src="/html/img/dian.png" class="dianImg">
                            关于开展对市民交通安全意识大培训
                        </li>
                        <li>
                            <img src="/html/img/dian.png" class="dianImg">
                            关于开展对市民交通安全意识大培训困了累了了了了了
                        </li>
                        <li>
                            <img src="/html/img/dian.png" class="dianImg">
                            关于开展对市民交通安全意识大培训
                        </li>

                    </ul>
                </div>
            </div>
            <div class="rank box activeTime newActive">
                <div class="login box">
                    <div class="title"><h2>活动新闻</h2> <a href="" class="more newMore">MORE</a></div>
                    <div class="box-cont hdtj">
                        <ul>
                            <li>
                                <img src="/html/img/dian.png" class="dianImg">
                                关于开展对市民交通安全意识大培训
                            </li>
                            <li>
                                <img src="/html/img/dian.png" class="dianImg">
                                关于开展对市民交通安全意识大培训
                            </li>

                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div style="clear: both;"></div>
    </div>
    <include file="public@footer"/>
    <!-- /container -->
    <include file="public@scripts"/>
</div>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/Swiper/4.5.1/js/swiper.min.js"></script>
<script type="text/javascript" src="/html/js/TweenMax.min.js"></script>
<script type="text/javascript" src="/html/layui/layui.js"></script>
<script type="text/javascript" src="/html/js/base.js"></script>
<script type="text/javascript">
    (function($){
        "use strict";
        function bind_events(){
            $('.title .title-item').on('mouseenter',function(e){
                //var name=e.currentTarget.innerText
                var _index = $(this).index();
                $(this).addClass('active').siblings().removeClass('active');
                $('.activity .box-cont .act-forenotice').eq(_index).removeClass("hidden").addClass("show").siblings().removeClass("show").addClass("hidden");
            });
            $('.tab-ctrl-item').off("click").on("click",function(e){
                e.preventDefault();
                var _index = $(this).index();
                $(this).addClass('active').siblings().removeClass('active');
                $('.rank .tab-pannel div').eq(_index).removeClass("hidden").siblings().addClass("hidden");
            });
            $(".act-forenotice").on("click", "a[class=page-link]", function () {
                var type_id=$(".title .active")[0].dataset.id
                $.get($(this).attr('href')+'&type_id='+type_id, function (html) {
                    var str=''
                    $.each(html.list.data,function(k,v){
                        str+=' <div class="notice"><div class="blockSty"> <a href="newDetail.html"> <div> <img src="/html/img/list.png" class="listImg"> <div class="blockTitle">'+v.post.post_title+'</div> <div style="clear: both;"></div> </div> <div class="timeAdd"> <i class="layui-icon layui-icon-log"></i>'+v.post.published_time +'</div> </a> </div> </div>';
                    })
                    str+='<ul class="pagination">'+html.page+'</ul>'
                    $('.show').html(str)
                });
                return false;
            })

        }
        $(function(){
            bind_events();
            $('.hdtj ul li:last').css("border","none");
            $('.zxgg ul li:last').css("border","none");
        })
    })(jQuery);




//    layui.use(['laypage', 'layer'], function() {
//        var laypage = layui.laypage
//                , layer = layui.layer;
//        laypage.render({
//            elem: 'listOne'
//            ,url:'/api/index/index/get_list'
//            ,layout: ['prev', 'page', 'next','limit', 'skip' ,'count']
//            ,prev: '<em>←</em>'
//            ,next: '<em>→</em>'
//            ,limit:1
//            , jump: function (obj, first) {
//
//                if (!first) {
//
//                }
//            }
//        });
//        laypage.render({
//            elem: 'listTwo'
//            ,count: 100
//            ,layout: ['prev', 'page', 'next', 'skip' ,'count']
//            ,prev: '<em>←</em>'
//            ,next: '<em>→</em>'
//            ,jump: function(obj){
//
//            }
//        });
//    });
</script>
</body>
</html>